Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(p(X)) → A__P(mark(X))
MARK(s(X)) → MARK(X)
A__P(s(X)) → MARK(X)
A__IF(true, X, Y) → MARK(X)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2))
A__LEQ(s(X), s(Y)) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
MARK(leq(X1, X2)) → MARK(X1)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__LEQ(s(X), s(Y)) → MARK(X)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(X)) → MARK(X)
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(p(X)) → A__P(mark(X))
MARK(s(X)) → MARK(X)
A__P(s(X)) → MARK(X)
A__IF(true, X, Y) → MARK(X)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2))
A__LEQ(s(X), s(Y)) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → MARK(X)
MARK(if(X1, X2, X3)) → MARK(X1)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
MARK(leq(X1, X2)) → MARK(X1)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__LEQ(s(X), s(Y)) → MARK(X)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(X)) → MARK(X)
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__LEQ(s(X), s(Y)) → A__LEQ(mark(X), mark(Y)) at position [0] we obtained the following new rules:

A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(0), s(y1)) → A__LEQ(0, mark(y1))
A__LEQ(s(false), s(y1)) → A__LEQ(false, mark(y1))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(true), s(y1)) → A__LEQ(true, mark(y1))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(true), s(y1)) → A__LEQ(true, mark(y1))
MARK(leq(X1, X2)) → MARK(X1)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(p(X)) → A__P(mark(X))
A__P(s(X)) → MARK(X)
A__IF(true, X, Y) → MARK(X)
MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2))
A__LEQ(s(0), s(y1)) → A__LEQ(0, mark(y1))
A__LEQ(s(false), s(y1)) → A__LEQ(false, mark(y1))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
QDP
              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(X1, X2)) → MARK(X1)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(p(X)) → A__P(mark(X))
A__P(s(X)) → MARK(X)
A__IF(true, X, Y) → MARK(X)
MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(p(X)) → A__P(mark(X)) at position [0] we obtained the following new rules:

MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(p(false)) → A__P(false)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
MARK(p(true)) → A__P(true)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(p(0)) → A__P(0)
MARK(p(s(x0))) → A__P(s(mark(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
QDP
                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
MARK(p(false)) → A__P(false)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(0)) → A__P(0)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
MARK(p(true)) → A__P(true)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
QDP
                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(X1, X2)) → MARK(X1)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(X1, X2)) → A__LEQ(mark(X1), mark(X2)) at position [0] we obtained the following new rules:

MARK(leq(p(x0), y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(0, y1)) → A__LEQ(0, mark(y1))
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(leq(true, y1)) → A__LEQ(true, mark(y1))
MARK(leq(false, y1)) → A__LEQ(false, mark(y1))
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
QDP
                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(leq(true, y1)) → A__LEQ(true, mark(y1))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(leq(false, y1)) → A__LEQ(false, mark(y1))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(x0), y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(0, y1)) → A__LEQ(0, mark(y1))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
QDP
                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
A__P(s(X)) → MARK(X)
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(x0), y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(if(X1, X2, X3)) → A__IF(mark(X1), X2, X3) at position [0] we obtained the following new rules:

MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(0, y1, y2)) → A__IF(0, y1, y2)
MARK(if(s(x0), y1, y2)) → A__IF(s(mark(x0)), y1, y2)
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
QDP
                                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(if(0, y1, y2)) → A__IF(0, y1, y2)
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(s(x0), y1, y2)) → A__IF(s(mark(x0)), y1, y2)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(x0), y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
QDP
                                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
A__P(s(X)) → MARK(X)
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(x0), y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(p(x0), y1)) → A__LEQ(a__p(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(p(y0), false)) → A__LEQ(a__p(mark(y0)), false)
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), 0)) → A__LEQ(a__p(mark(y0)), 0)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), true)) → A__LEQ(a__p(mark(y0)), true)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
QDP
                                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), 0)) → A__LEQ(a__p(mark(y0)), 0)
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(leq(p(y0), true)) → A__LEQ(a__p(mark(y0)), true)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), false)) → A__LEQ(a__p(mark(y0)), false)
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
QDP
                                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(diff(x0, x1), y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(diff(y0, y1), false)) → A__LEQ(a__diff(mark(y0), mark(y1)), false)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), 0)) → A__LEQ(a__diff(mark(y0), mark(y1)), 0)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), true)) → A__LEQ(a__diff(mark(y0), mark(y1)), true)
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
QDP
                                                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), false)) → A__LEQ(a__diff(mark(y0), mark(y1)), false)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(diff(y0, y1), true)) → A__LEQ(a__diff(mark(y0), mark(y1)), true)
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), 0)) → A__LEQ(a__diff(mark(y0), mark(y1)), 0)
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
QDP
                                                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(s(x0), y1)) → A__LEQ(s(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), true)) → A__LEQ(s(mark(y0)), true)
MARK(leq(s(y0), false)) → A__LEQ(s(mark(y0)), false)
MARK(leq(s(y0), 0)) → A__LEQ(s(mark(y0)), 0)
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
QDP
                                                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(s(y0), 0)) → A__LEQ(s(mark(y0)), 0)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(s(y0), true)) → A__LEQ(s(mark(y0)), true)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(s(y0), false)) → A__LEQ(s(mark(y0)), false)

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
QDP
                                                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))
MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(if(x0, x1, x2), y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(if(y0, y1, y2), 0)) → A__LEQ(a__if(mark(y0), y1, y2), 0)
MARK(leq(if(y0, y1, y2), false)) → A__LEQ(a__if(mark(y0), y1, y2), false)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(if(y0, y1, y2), true)) → A__LEQ(a__if(mark(y0), y1, y2), true)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
QDP
                                                                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), 0)) → A__LEQ(a__if(mark(y0), y1, y2), 0)
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), true)) → A__LEQ(a__if(mark(y0), y1, y2), true)
MARK(leq(if(y0, y1, y2), false)) → A__LEQ(a__if(mark(y0), y1, y2), false)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
QDP
                                                                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(leq(x0, x1), y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), false)) → A__LEQ(a__leq(mark(y0), mark(y1)), false)
MARK(leq(leq(y0, y1), 0)) → A__LEQ(a__leq(mark(y0), mark(y1)), 0)
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), true)) → A__LEQ(a__leq(mark(y0), mark(y1)), true)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
QDP
                                                                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
MARK(leq(leq(y0, y1), false)) → A__LEQ(a__leq(mark(y0), mark(y1)), false)
MARK(leq(leq(y0, y1), 0)) → A__LEQ(a__leq(mark(y0), mark(y1)), 0)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(leq(y0, y1), true)) → A__LEQ(a__leq(mark(y0), mark(y1)), true)
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
QDP
                                                                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__LEQ(s(p(x0)), s(y1)) → A__LEQ(a__p(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

A__LEQ(s(p(y0)), s(0)) → A__LEQ(a__p(mark(y0)), 0)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(y0)), s(false)) → A__LEQ(a__p(mark(y0)), false)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(true)) → A__LEQ(a__p(mark(y0)), true)
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
QDP
                                                                                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(false)) → A__LEQ(a__p(mark(y0)), false)
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(p(y0)), s(true)) → A__LEQ(a__p(mark(y0)), true)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(0)) → A__LEQ(a__p(mark(y0)), 0)
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
QDP
                                                                                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1))
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__LEQ(s(leq(x0, x1)), s(y1)) → A__LEQ(a__leq(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(0)) → A__LEQ(a__leq(mark(y0), mark(y1)), 0)
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(true)) → A__LEQ(a__leq(mark(y0), mark(y1)), true)
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(false)) → A__LEQ(a__leq(mark(y0), mark(y1)), false)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
QDP
                                                                                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(0)) → A__LEQ(a__leq(mark(y0), mark(y1)), 0)
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(leq(y0, y1)), s(false)) → A__LEQ(a__leq(mark(y0), mark(y1)), false)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(true)) → A__LEQ(a__leq(mark(y0), mark(y1)), true)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
QDP
                                                                                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__LEQ(s(diff(x0, x1)), s(y1)) → A__LEQ(a__diff(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(false)) → A__LEQ(a__diff(mark(y0), mark(y1)), false)
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(true)) → A__LEQ(a__diff(mark(y0), mark(y1)), true)
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(0)) → A__LEQ(a__diff(mark(y0), mark(y1)), 0)
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
QDP
                                                                                                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(true)) → A__LEQ(a__diff(mark(y0), mark(y1)), true)
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(diff(y0, y1)), s(0)) → A__LEQ(a__diff(mark(y0), mark(y1)), 0)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(false)) → A__LEQ(a__diff(mark(y0), mark(y1)), false)
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
                                                                                                ↳ QDP
                                                                                                  ↳ DependencyGraphProof
QDP
                                                                                                      ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__LEQ(s(s(x0)), s(y1)) → A__LEQ(s(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

A__LEQ(s(s(y0)), s(leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(false)) → A__LEQ(s(mark(y0)), false)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(s(y0)), s(true)) → A__LEQ(s(mark(y0)), true)
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(s(y0)), s(0)) → A__LEQ(s(mark(y0)), 0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
                                                                                                ↳ QDP
                                                                                                  ↳ DependencyGraphProof
                                                                                                    ↳ QDP
                                                                                                      ↳ Narrowing
QDP
                                                                                                          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
A__LEQ(s(s(y0)), s(true)) → A__LEQ(s(mark(y0)), true)
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(false)) → A__LEQ(s(mark(y0)), false)
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(s(y0)), s(0)) → A__LEQ(s(mark(y0)), 0)
A__LEQ(s(s(y0)), s(leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
                                                                                                ↳ QDP
                                                                                                  ↳ DependencyGraphProof
                                                                                                    ↳ QDP
                                                                                                      ↳ Narrowing
                                                                                                        ↳ QDP
                                                                                                          ↳ DependencyGraphProof
QDP
                                                                                                              ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule A__LEQ(s(if(x0, x1, x2)), s(y1)) → A__LEQ(a__if(mark(x0), x1, x2), mark(y1)) at position [1] we obtained the following new rules:

A__LEQ(s(if(y0, y1, y2)), s(s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
A__LEQ(s(if(y0, y1, y2)), s(0)) → A__LEQ(a__if(mark(y0), y1, y2), 0)
A__LEQ(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(true)) → A__LEQ(a__if(mark(y0), y1, y2), true)
A__LEQ(s(if(y0, y1, y2)), s(p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
A__LEQ(s(if(y0, y1, y2)), s(diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(false)) → A__LEQ(a__if(mark(y0), y1, y2), false)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
                                                                                                ↳ QDP
                                                                                                  ↳ DependencyGraphProof
                                                                                                    ↳ QDP
                                                                                                      ↳ Narrowing
                                                                                                        ↳ QDP
                                                                                                          ↳ DependencyGraphProof
                                                                                                            ↳ QDP
                                                                                                              ↳ Narrowing
QDP
                                                                                                                  ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(0)) → A__LEQ(a__if(mark(y0), y1, y2), 0)
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(X1, X2)) → MARK(X2)
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(if(y0, y1, y2)), s(s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(diff(X1, X2)) → MARK(X1)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(s(X)) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(true)) → A__LEQ(a__if(mark(y0), y1, y2), true)
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(if(y0, y1, y2)), s(false)) → A__LEQ(a__if(mark(y0), y1, y2), false)
A__LEQ(s(s(y0)), s(leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__LEQ(s(if(y0, y1, y2)), s(diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
                                                                                                ↳ QDP
                                                                                                  ↳ DependencyGraphProof
                                                                                                    ↳ QDP
                                                                                                      ↳ Narrowing
                                                                                                        ↳ QDP
                                                                                                          ↳ DependencyGraphProof
                                                                                                            ↳ QDP
                                                                                                              ↳ Narrowing
                                                                                                                ↳ QDP
                                                                                                                  ↳ DependencyGraphProof
QDP
                                                                                                                      ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(if(y0, y1, y2)), s(leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(if(y0, y1, y2)), s(s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__LEQ(s(if(y0, y1, y2)), s(diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


A__LEQ(s(if(y0, y1, y2)), s(leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__leq(mark(x0), mark(x1)))
MARK(p(leq(x0, x1))) → A__P(a__leq(mark(x0), mark(x1)))
MARK(leq(p(y0), leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(s(y0), leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(p(y0)), s(leq(x0, x1))) → A__LEQ(a__p(mark(y0)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
A__LEQ(s(s(y0)), s(leq(x0, x1))) → A__LEQ(s(mark(y0)), a__leq(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__leq(mark(x0), mark(x1)))
The remaining pairs can at least be oriented weakly.

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(if(y0, y1, y2)), s(s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__LEQ(s(if(y0, y1, y2)), s(diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(A__DIFF(x1, x2)) = 1   
POL(A__IF(x1, x2, x3)) = 1   
POL(A__LEQ(x1, x2)) = x2   
POL(A__P(x1)) = x1   
POL(MARK(x1)) = 1   
POL(a__diff(x1, x2)) = 1   
POL(a__if(x1, x2, x3)) = 1   
POL(a__leq(x1, x2)) = 0   
POL(a__p(x1)) = 1   
POL(diff(x1, x2)) = 0   
POL(false) = 0   
POL(if(x1, x2, x3)) = 0   
POL(leq(x1, x2)) = 0   
POL(mark(x1)) = 1   
POL(p(x1)) = 0   
POL(s(x1)) = 1   
POL(true) = 0   

The following usable rules [17] were oriented:

a__p(0) → 0
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__leq(s(X), 0) → false
a__leq(0, Y) → true
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
a__p(s(X)) → mark(X)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
a__if(true, X, Y) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
a__if(false, X, Y) → mark(Y)
mark(0) → 0
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
                                                                                                ↳ QDP
                                                                                                  ↳ DependencyGraphProof
                                                                                                    ↳ QDP
                                                                                                      ↳ Narrowing
                                                                                                        ↳ QDP
                                                                                                          ↳ DependencyGraphProof
                                                                                                            ↳ QDP
                                                                                                              ↳ Narrowing
                                                                                                                ↳ QDP
                                                                                                                  ↳ DependencyGraphProof
                                                                                                                    ↳ QDP
                                                                                                                      ↳ QDPOrderProof
QDP
                                                                                                                          ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(if(y0, y1, y2)), s(s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(s(X)) → MARK(X)
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__LEQ(s(if(y0, y1, y2)), s(diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(leq(leq(y0, y1), p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(leq(y0, y1), s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(leq(y0, y1)), s(p(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(leq(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → A__LEQ(a__leq(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(leq(y0, y1)), s(s(x0))) → A__LEQ(a__leq(mark(y0), mark(y1)), s(mark(x0)))
The remaining pairs can at least be oriented weakly.

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(leq(X1, X2)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(p(X)) → MARK(X)
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(if(y0, y1, y2)), s(s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(s(X)) → MARK(X)
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__LEQ(s(if(y0, y1, y2)), s(diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(A__DIFF(x1, x2)) = 1   
POL(A__IF(x1, x2, x3)) = 1   
POL(A__LEQ(x1, x2)) = x1   
POL(A__P(x1)) = 1   
POL(MARK(x1)) = 1   
POL(a__diff(x1, x2)) = 1   
POL(a__if(x1, x2, x3)) = 1   
POL(a__leq(x1, x2)) = 0   
POL(a__p(x1)) = 1   
POL(diff(x1, x2)) = 0   
POL(false) = 0   
POL(if(x1, x2, x3)) = 0   
POL(leq(x1, x2)) = 0   
POL(mark(x1)) = 1   
POL(p(x1)) = 0   
POL(s(x1)) = 1   
POL(true) = 0   

The following usable rules [17] were oriented:

a__p(0) → 0
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__leq(s(X), 0) → false
a__leq(0, Y) → true
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
a__p(s(X)) → mark(X)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
a__if(true, X, Y) → mark(X)
mark(p(X)) → a__p(mark(X))
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
a__if(false, X, Y) → mark(Y)
mark(0) → 0
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ Narrowing
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ QDP
              ↳ Narrowing
                ↳ QDP
                  ↳ DependencyGraphProof
                    ↳ QDP
                      ↳ Narrowing
                        ↳ QDP
                          ↳ DependencyGraphProof
                            ↳ QDP
                              ↳ Narrowing
                                ↳ QDP
                                  ↳ DependencyGraphProof
                                    ↳ QDP
                                      ↳ Narrowing
                                        ↳ QDP
                                          ↳ DependencyGraphProof
                                            ↳ QDP
                                              ↳ Narrowing
                                                ↳ QDP
                                                  ↳ DependencyGraphProof
                                                    ↳ QDP
                                                      ↳ Narrowing
                                                        ↳ QDP
                                                          ↳ DependencyGraphProof
                                                            ↳ QDP
                                                              ↳ Narrowing
                                                                ↳ QDP
                                                                  ↳ DependencyGraphProof
                                                                    ↳ QDP
                                                                      ↳ Narrowing
                                                                        ↳ QDP
                                                                          ↳ DependencyGraphProof
                                                                            ↳ QDP
                                                                              ↳ Narrowing
                                                                                ↳ QDP
                                                                                  ↳ DependencyGraphProof
                                                                                    ↳ QDP
                                                                                      ↳ Narrowing
                                                                                        ↳ QDP
                                                                                          ↳ DependencyGraphProof
                                                                                            ↳ QDP
                                                                                              ↳ Narrowing
                                                                                                ↳ QDP
                                                                                                  ↳ DependencyGraphProof
                                                                                                    ↳ QDP
                                                                                                      ↳ Narrowing
                                                                                                        ↳ QDP
                                                                                                          ↳ DependencyGraphProof
                                                                                                            ↳ QDP
                                                                                                              ↳ Narrowing
                                                                                                                ↳ QDP
                                                                                                                  ↳ DependencyGraphProof
                                                                                                                    ↳ QDP
                                                                                                                      ↳ QDPOrderProof
                                                                                                                        ↳ QDP
                                                                                                                          ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
MARK(leq(p(y0), if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → A__IF(a__if(mark(x0), x1, x2), y1, y2)
A__LEQ(s(p(y0)), s(diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(p(diff(x0, x1))) → A__P(a__diff(mark(x0), mark(x1)))
MARK(leq(X1, X2)) → MARK(X2)
MARK(diff(X1, X2)) → MARK(X2)
MARK(leq(s(y0), if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(p(y0)), s(s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(s(y0)), s(p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(if(X1, X2, X3)) → MARK(X1)
MARK(if(true, y1, y2)) → A__IF(true, y1, y2)
MARK(leq(X1, X2)) → MARK(X1)
MARK(p(X)) → MARK(X)
A__LEQ(s(s(y0)), s(if(x0, x1, x2))) → A__LEQ(s(mark(y0)), a__if(mark(x0), x1, x2))
MARK(if(false, y1, y2)) → A__IF(false, y1, y2)
MARK(leq(s(y0), p(x0))) → A__LEQ(s(mark(y0)), a__p(mark(x0)))
MARK(leq(p(y0), s(x0))) → A__LEQ(a__p(mark(y0)), s(mark(x0)))
A__LEQ(s(p(y0)), s(p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__LEQ(s(diff(y0, y1)), s(diff(x0, x1))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__diff(mark(x0), mark(x1)))
MARK(diff(X1, X2)) → A__DIFF(mark(X1), mark(X2))
MARK(leq(p(y0), p(x0))) → A__LEQ(a__p(mark(y0)), a__p(mark(x0)))
A__P(s(X)) → MARK(X)
MARK(p(p(x0))) → A__P(a__p(mark(x0)))
MARK(leq(s(y0), s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), p(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__p(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → A__LEQ(a__p(mark(y0)), a__diff(mark(x0), mark(x1)))
A__IF(false, X, Y) → MARK(Y)
A__LEQ(s(s(y0)), s(s(x0))) → A__LEQ(s(mark(y0)), s(mark(x0)))
A__DIFF(X, Y) → A__IF(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(s(x0))) → A__P(s(mark(x0)))
A__LEQ(s(X), s(Y)) → MARK(Y)
MARK(diff(X1, X2)) → MARK(X1)
A__LEQ(s(if(y0, y1, y2)), s(s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → A__IF(a__diff(mark(x0), mark(x1)), y1, y2)
MARK(if(p(x0), y1, y2)) → A__IF(a__p(mark(x0)), y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → A__LEQ(a__if(mark(y0), y1, y2), s(mark(x0)))
MARK(s(X)) → MARK(X)
A__LEQ(s(diff(y0, y1)), s(s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
A__LEQ(s(s(y0)), s(diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(if(leq(x0, x1), y1, y2)) → A__IF(a__leq(mark(x0), mark(x1)), y1, y2)
A__LEQ(s(p(y0)), s(if(x0, x1, x2))) → A__LEQ(a__p(mark(y0)), a__if(mark(x0), x1, x2))
A__LEQ(s(X), s(Y)) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
MARK(leq(diff(y0, y1), s(x0))) → A__LEQ(a__diff(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → A__LEQ(s(mark(y0)), a__diff(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))
A__LEQ(s(diff(y0, y1)), s(if(x0, x1, x2))) → A__LEQ(a__diff(mark(y0), mark(y1)), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → A__LEQ(a__if(mark(y0), y1, y2), a__if(mark(x0), x1, x2))
A__LEQ(s(if(y0, y1, y2)), s(p(x0))) → A__LEQ(a__if(mark(y0), y1, y2), a__p(mark(x0)))
A__IF(true, X, Y) → MARK(X)
MARK(p(if(x0, x1, x2))) → A__P(a__if(mark(x0), x1, x2))
A__DIFF(X, Y) → MARK(X)
A__DIFF(X, Y) → MARK(Y)
A__DIFF(X, Y) → A__LEQ(mark(X), mark(Y))
A__LEQ(s(if(y0, y1, y2)), s(diff(x0, x1))) → A__LEQ(a__if(mark(y0), y1, y2), a__diff(mark(x0), mark(x1)))

The TRS R consists of the following rules:

a__p(0) → 0
a__p(s(X)) → mark(X)
a__leq(0, Y) → true
a__leq(s(X), 0) → false
a__leq(s(X), s(Y)) → a__leq(mark(X), mark(Y))
a__if(true, X, Y) → mark(X)
a__if(false, X, Y) → mark(Y)
a__diff(X, Y) → a__if(a__leq(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(p(X)) → a__p(mark(X))
mark(leq(X1, X2)) → a__leq(mark(X1), mark(X2))
mark(if(X1, X2, X3)) → a__if(mark(X1), X2, X3)
mark(diff(X1, X2)) → a__diff(mark(X1), mark(X2))
mark(0) → 0
mark(s(X)) → s(mark(X))
mark(true) → true
mark(false) → false
a__p(X) → p(X)
a__leq(X1, X2) → leq(X1, X2)
a__if(X1, X2, X3) → if(X1, X2, X3)
a__diff(X1, X2) → diff(X1, X2)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.